package Tree;

public class Tree {


    /*
    *            a              0
    *           / \            / \
    *          b   c          1   2
    *         /   / \        /   / \
    *        d   e   f      3   4   5
    *             \             \
    *              g             6
    * */
    public static TreeNode getBinaryTree(){
        TreeNode a = new TreeNode(0);
        TreeNode b = new TreeNode(1);
        TreeNode c = new TreeNode(2);
        TreeNode d = new TreeNode(3);
        TreeNode e = new TreeNode(4);
        TreeNode f = new TreeNode(5);
        TreeNode g = new TreeNode(6);

        a.left = b;
        a.right = c;

        b.left = d;

        c.left = e;
        c.right = f;

        e.right = g;

        return a;
    }
}
